package org.masterview.user.client.validation;

import org.masterview.user.client.data.PropertyMapper;

public class SampleBeanPropertyMapper extends PropertyMapper
{
    public Object getProperty(Object object, String string) {
        SampleBean bean = (SampleBean) object;

        if (string.equals("text")) {
            return bean.getText();
        } else if (string.equals("number")) {
            return new Integer(bean.getNumber());
        } else if (string.equals("date")) {
            return bean.getDate();
        }

        return null;
    }
}